package models;

import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import play.db.jpa.Model;

@Entity
@Table(name = "Days")
public class Day extends Model {

	public Calendar date;

	@OneToMany(mappedBy = "day", cascade = { CascadeType.REMOVE })
	public List<DayTask> dayTasks = new LinkedList<DayTask>();

	/*
	 * public Day(double actualEffort , double estimatedEffort,boolean weekend ,
	 * Calendar date,List<Task>taskList) { this.actualEffort=actualEffort;
	 * this.estimatedEffort=estimatedEffort; this.weekend=weekend;
	 * this.date=date; this.tasks=taskList; }
	 */
	public Day() {
	}

	public Day(Calendar date) {
		this.date = date;
	}
}
